package com.assessment.mapper;

import com.assessment.model.entity.Teacher;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * 教师Mapper接口
 */
public interface TeacherMapper extends BaseMapper<Teacher> {

    /**
     * 根据手机号查询教师
     */
    @Select("SELECT * FROM t_teacher WHERE mobile = #{mobile} AND deleted = 0 LIMIT 1")
    Teacher findByMobile(@Param("mobile") String mobile);
}
